//
//  TabBarViewController.swift
//  testsetting
//
//  Created by GAOMO on 2019/10/16.
//  Copyright © 2019 GAOMO. All rights reserved.
//

import UIKit

class TabBarViewController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = UIColor.white
        
        creatSubViewController()
        
    }
    func creatSubViewController() {
        let homeVC = TabCon1ViewController()
        homeVC.title = "首页"
        let nav = UINavigationController(rootViewController: homeVC)
        nav.tabBarItem.image = UIImage(named: "Fill 1")
        nav.tabBarItem.selectedImage = UIImage(named: "Fill 1")
        
        let pageVC = TabCon2()
        pageVC.title = "我的"
        pageVC.tabBarItem.image = UIImage(named: "Fill 1")
        pageVC.tabBarItem.selectedImage = UIImage(named: "Fill 1")
        
        let tabArr = [nav,pageVC]
        viewControllers = tabArr
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
